function request(obj) {
    //判断data是否为FormDate类型
    const isFormData = (obj.data instanceof FormData); // 如果是FormData对象，需要设置processData为false，contentType为false
    const token = window.localStorage.getItem('big_token')
    $.ajax({
        type: obj.type,
        url: obj.url,
        data: obj.data,
        dataType: obj.dataType,
        processData: isFormData ? false : true,
        contentType: isFormData ? false : 'application/x-www-form-urlencoded',
        headers: {
            Authorization: token
        },
        success: function (response) {
            obj.success(response)
        },
        error: function (jqXHR, textStatus) {
            // console.log(jqXHR);
            if (jqXHR.status === 403) {
                window.location.href = './login.html'
            } else if (jqXHR.status === 400) {
                alert(jqXHR.responseJSON.msg)
            }
        }
    });
}
// request(obj)